﻿<controls:MetroWindow
    
        x:Class="monitor_server_2_WPF.LogWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        Title="LogWindow" Height="494.65" Width="400" Loaded="LogWindow_OnLoaded" Closed="LogWindow_OnClosed" 
        MinHeight="400" MinWidth="900" ResizeMode="CanResizeWithGrip" WindowStartupLocation="CenterOwner">


    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />-->
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/CustomStylesDictionary.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <!--<Window.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
    </Window.Triggers>-->
    <Grid Name="MainGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition Height="150"/>
            <RowDefinition Height="0"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="25"/>
        </Grid.RowDefinitions>
        <Menu HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0">
            <MenuItem Name="CloseMenuItem" Header="Close" Click="CloseMenuItem_OnClick"/>
            <!--<MenuItem Name="RefreshMenuItem" Header="Refresh" Click="RefreshMenuItem_OnClick"/>-->
        </Menu>
        <Border Grid.Row="1" BorderThickness="2,2,2,2" BorderBrush="Gray">
            <Grid Name="SettingsGrid" Grid.Row="1" Background="Black">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"/>
                    <ColumnDefinition Width="1*"/>
                    <ColumnDefinition Width="1*"/>
                    <ColumnDefinition Width="1*"/>
                    <ColumnDefinition Width="1*"/>
                    <ColumnDefinition Width="1.5*"/>
                </Grid.ColumnDefinitions>

                <StackPanel Name="CategoriesPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Margin="3,0,3,0">
                    <Label Name="CategoryLabel" Content="Category" Foreground="White" HorizontalAlignment="Stretch" VerticalAlignment="Top"/>
                    <CheckBox Name="AllCategoryBox" Content="all" IsThreeState="False"/>
                    <CheckBox Name="LoginCategoryBox" Content="login" IsThreeState="False"/>
                    <CheckBox Name="InformationCategoryBox" Content="information" IsThreeState="False"/>
                    <CheckBox Name="WarningCategoryBox" Content="warning" IsThreeState="False"/>
                </StackPanel>

                <StackPanel Name="AccessPanel" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,0,3,0">
                    <Label Name="AccessLabel" Content="Access" Foreground="White" HorizontalAlignment="Stretch" VerticalAlignment="Top"/>
                    <CheckBox Name="AllAccessBox" Content="all" IsThreeState="False"/>
                    <CheckBox Name="AdminAccessBox" Content="admin" IsThreeState="False"/>
                    <CheckBox Name="UserAccessBox" Content="user" IsThreeState="False"/>
                </StackPanel>


                <Grid Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,0,3,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="26"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="25"/>
                    </Grid.RowDefinitions>
                    <Label Name="RegionLabel" Content="Region" Foreground="White" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
                    <TextBox Name="RegionBox" HorizontalAlignment="Stretch" Grid.Row="1" TextWrapping="Wrap" AcceptsReturn="True" VerticalAlignment="Stretch"/>
                    <CheckBox Name="RegionCheckBox" Content="CheckBox" HorizontalAlignment="Stretch" Grid.Row="2" VerticalAlignment="Center" 
                              IsThreeState="False" Checked="CheckBox_OnChecked" Unchecked="CheckBox_OnUnchecked"/>
                </Grid>
                <Grid Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,0,3,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="26"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="25"/>
                    </Grid.RowDefinitions>
                    <Label Name="UserLabel" Content="User" Foreground="White" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
                    <TextBox Name="UserBox" HorizontalAlignment="Stretch" AcceptsReturn="True" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Stretch"/>
                    <CheckBox Name="UserCheckBox" Content="CheckBox" HorizontalAlignment="Stretch" Grid.Row="2" 
                              VerticalAlignment="Center" IsThreeState="False" Checked="CheckBox_OnChecked" Unchecked="CheckBox_OnUnchecked"/>
                </Grid>
                <Grid Grid.Column="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,0,3,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="26"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="25"/>
                    </Grid.RowDefinitions>
                    <Label Name="EventLabel" Content="Event" Foreground="White" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
                    <TextBox Name="EventBox" HorizontalAlignment="Stretch" Grid.Row="1" AcceptsReturn="True" TextWrapping="Wrap" VerticalAlignment="Stretch"/>
                    <CheckBox Name="EventCheckBox" Content="CheckBox" HorizontalAlignment="Stretch" Grid.Row="2" 
                              VerticalAlignment="Center" IsThreeState="False" Checked="CheckBox_OnChecked" Unchecked="CheckBox_OnUnchecked"/>
                </Grid>
                <Grid Grid.Column="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,0,2,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="30"/>
                    </Grid.RowDefinitions>
                    <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <Label Name="StartTimeLabel" Content="Start" Foreground="White"/>
                        <xctk:DateTimePicker x:Name="StartTime" HorizontalAlignment="Stretch" ShowButtonSpinner="False"/>
                    </StackPanel>
                    <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1">
                        <Label Name="EndTimeLabel" Content="StopTime" Foreground="White" HorizontalAlignment="Stretch" VerticalAlignment="Top"/>
                        <xctk:DateTimePicker x:Name="EndTime" HorizontalAlignment="Stretch" ShowButtonSpinner="False"/>
                    </StackPanel>
                    <Button Name="RefreshButton" Content="Refresh" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="2" Click="RefreshButton_Click"/>
                </Grid>


            </Grid>
        </Border>
        <DataGrid Name="LogGrid"  Grid.Row="3" Margin="1,0,1,0"/>
        <StatusBar Name="StatusBar" HorizontalAlignment="Stretch" Grid.Row="4" VerticalAlignment="Stretch">
            <StatusBarItem>
                <TextBlock Name="RecordsCountLabel" Text="Label" Foreground="White"/>
            </StatusBarItem>
            <StatusBarItem>
                <TextBlock Name="RecordsCountBox" Text="Value" Foreground="White" Margin="3,0,0,0"/>
            </StatusBarItem>
        </StatusBar>


    </Grid>
</controls:MetroWindow>
